<div id="History-browsing"></div>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[cvs: Adding, removing, and renaming files and directories#Moving-directories  &lt; ]|</td>
<td valign="middle" align="left">|[[#log-messages| &gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[cvs: Adding, removing, and renaming files and directories#Adding-and-removing  &lt;&lt; ]|</td>
<td valign="middle" align="left">|[[cvs#Top| Up ]]|</td>
<td valign="middle" align="left">|[cvs: Handling binary files#Binary-files  &gt;&gt; ]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[cvs#Top|Top]]|</td>
<td valign="middle" align="left">|[cvs: Table of Contents#SEC_Contents Contents]|</td>
<td valign="middle" align="left">|[cvs: Index#Index Index]|</td>
<td valign="middle" align="left">|[cvs: About this Manual#SEC_About  ? ]|</td>
</tr></table>
<div id="History-browsing-1"></div>
== History browsing ==
<div id="index-History-browsing"></div>
<div id="index-Traceability"></div>
<div id="index-Isolation"></div>


<p>Once you have used <small>CVS</small> to store a version control
history&mdash;what files have changed when, how, and by
whom, there are a variety of mechanisms for looking
through the history.
</p>
<pre class="menu-preformatted"><nowiki></nowiki>&bull;[[#log-messages| log messages]]::<nowiki>                Log messages
</nowiki>&bull;[[#history-database| history database]]::<nowiki>            The history database
</nowiki>&bull;[[#user_002ddefined-logging| user-defined logging]]::<nowiki>        User-defined logging
</nowiki>&bull;[[#annotate| annotate]]::<nowiki>                    What revision modified each line of a file?
</nowiki></pre>
<hr size="6">
<div id="log-messages"></div>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#History-browsing| &lt; ]]|</td>
<td valign="middle" align="left">|[[#history-database| &gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#History-browsing| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#History-browsing| Up ]]|</td>
<td valign="middle" align="left">|[cvs: Handling binary files#Binary-files  &gt;&gt; ]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[cvs#Top|Top]]|</td>
<td valign="middle" align="left">|[cvs: Table of Contents#SEC_Contents Contents]|</td>
<td valign="middle" align="left">|[cvs: Index#Index Index]|</td>
<td valign="middle" align="left">|[cvs: About this Manual#SEC_About  ? ]|</td>
</tr></table>
<div id="Log-messages"></div>
=== Log messages ===

<p>Whenever you commit a file you specify a log message.
</p>
<p>To look through the log messages which have been
specified for every revision which has been committed,
use the <code>cvs log</code> command (see section [cvs: Guide to CVS commands#log log&mdash;Print out log information for files]).
</p>
<hr size="6">
<div id="history-database"></div>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#log-messages| &lt; ]]|</td>
<td valign="middle" align="left">|[[#user_002ddefined-logging| &gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#History-browsing| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#History-browsing| Up ]]|</td>
<td valign="middle" align="left">|[cvs: Handling binary files#Binary-files  &gt;&gt; ]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[cvs#Top|Top]]|</td>
<td valign="middle" align="left">|[cvs: Table of Contents#SEC_Contents Contents]|</td>
<td valign="middle" align="left">|[cvs: Index#Index Index]|</td>
<td valign="middle" align="left">|[cvs: About this Manual#SEC_About  ? ]|</td>
</tr></table>
<div id="The-history-database"></div>
=== The history database ===

<p>You can use the history file (see section [cvs: Reference manual for Administrative files#history-file The history file]) to
log various <small>CVS</small> actions.  To retrieve the
information from the history file, use the <code>cvs
history</code> command (see section [cvs: Guide to CVS commands#history history&mdash;Show status of files and users]).
</p>
<p>Note: you can control what is logged to this file by using the
&lsquo;<samp>LogHistory</samp>&rsquo; keyword in the &lsquo;<tt>CVSROOT/config</tt>&rsquo; file
(see section [cvs: Reference manual for Administrative files#config The CVSROOT/config configuration file]).
</p>

<hr size="6">
<div id="user_002ddefined-logging"></div>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#history-database| &lt; ]]|</td>
<td valign="middle" align="left">|[[#annotate| &gt; ]]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#History-browsing| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#History-browsing| Up ]]|</td>
<td valign="middle" align="left">|[cvs: Handling binary files#Binary-files  &gt;&gt; ]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[cvs#Top|Top]]|</td>
<td valign="middle" align="left">|[cvs: Table of Contents#SEC_Contents Contents]|</td>
<td valign="middle" align="left">|[cvs: Index#Index Index]|</td>
<td valign="middle" align="left">|[cvs: About this Manual#SEC_About  ? ]|</td>
</tr></table>
<div id="User_002ddefined-logging"></div>
=== User-defined logging ===

<p>You can customize <small>CVS</small> to log various kinds of
actions, in whatever manner you choose.  These
mechanisms operate by executing a script at various
times.  The script might append a message to a file
listing the information and the programmer who created
it, or send mail to a group of developers, or, perhaps,
post a message to a particular newsgroup.  To log
commits, use the &lsquo;<tt>loginfo</tt>&rsquo; file (see section [cvs: Reference manual for Administrative files#loginfo Loginfo]).
To log commits, checkouts, exports, and tags,
respectively, you can also use the &lsquo;<samp>-i</samp>&rsquo;,
&lsquo;<samp>-o</samp>&rsquo;, &lsquo;<samp>-e</samp>&rsquo;, and &lsquo;<samp>-t</samp>&rsquo; options in the
modules file.  For a more flexible way of giving
notifications to various users, which requires less in
the way of keeping centralized scripts up to date, use
the <code>cvs watch add</code> command (see section [cvs: Multiple developers#Getting-Notified Telling CVS to notify you]); this command is useful even if you are not
using <code>cvs watch on</code>.
</p>
<div id="index-taginfo"></div>
<div id="index-Exit-status_002c-of-taginfo"></div>
<p>The &lsquo;<tt>taginfo</tt>&rsquo; file defines programs to execute
when someone executes a <code>tag</code> or <code>rtag</code>
command.  The &lsquo;<tt>taginfo</tt>&rsquo; file has the standard form
for administrative files (see section [cvs: Reference manual for Administrative files#Administrative-files Reference manual for Administrative files]), where each line is a regular expression
followed by a command to execute.  The arguments passed
to the command are, in order, the <var>tagname</var>,
<var>operation</var> (<code>add</code> for <code>tag</code>,
<code>mov</code> for <code>tag -F</code>, and <code>del</code> for
<code>tag -d</code>), <var>repository</var>, and any remaining are
pairs of <var>filename</var> <var>revision</var>.  A non-zero
exit of the filter program will cause the tag to be
aborted.
</p>
<p>Here is an example of using taginfo to log tag and rtag
commands.  In the taginfo file put:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example"><nowiki>ALL /usr/local/cvsroot/CVSROOT/loggit
</nowiki></pre></td></tr></table>

<p>Where &lsquo;<tt>/usr/local/cvsroot/CVSROOT/loggit</tt>&rsquo; contains the
following script:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example"><nowiki>#!/bin/sh
echo &quot;$@&quot; &gt;&gt;/home/kingdon/cvsroot/CVSROOT/taglog
</nowiki></pre></td></tr></table>

<hr size="6">
<div id="annotate"></div>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#user_002ddefined-logging| &lt; ]]|</td>
<td valign="middle" align="left">|[cvs: Handling binary files#Binary-files  &gt; ]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[#History-browsing| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[[#History-browsing| Up ]]|</td>
<td valign="middle" align="left">|[cvs: Handling binary files#Binary-files  &gt;&gt; ]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[cvs#Top|Top]]|</td>
<td valign="middle" align="left">|[cvs: Table of Contents#SEC_Contents Contents]|</td>
<td valign="middle" align="left">|[cvs: Index#Index Index]|</td>
<td valign="middle" align="left">|[cvs: About this Manual#SEC_About  ? ]|</td>
</tr></table>
<div id="Annotate-command"></div>
=== Annotate command ===
<div id="index-annotate-_0028subcommand_0029"></div>

<dl>
<dt><div id="index-cvs-annotate"></div><u>Command:</u> <b>cvs annotate</b><i> [<code>-FflR</code>] [<code>-r rev</code>|<code>-D date</code>] files &hellip;</i></dt>
<dd>
<p>For each file in <var>files</var>, print the head revision
of the trunk, together with information on the last
modification for each line.  For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example"><nowiki>$ cvs annotate ssfile
Annotations for ssfile
***************
1.1          (mary     27-Mar-96): ssfile line 1
1.2          (joe      28-Mar-96): ssfile line 2
</nowiki></pre></td></tr></table>

<p>The file &lsquo;<tt>ssfile</tt>&rsquo; currently contains two lines.
The <code>ssfile line 1</code> line was checked in by
<code>mary</code> on March 27.  Then, on March 28, <code>joe</code>
added a line <code>ssfile line 2</code>, without modifying
the <code>ssfile line 1</code> line.  This report doesn&rsquo;t
tell you anything about lines which have been deleted
or replaced; you need to use <code>cvs diff</code> for that
(see section [cvs: Guide to CVS commands#diff diff&mdash;Show differences between revisions]).
</p>
</dd></dl>

<p>The options to <code>cvs annotate</code> are listed in
[cvs: Quick reference to CVS commands#Invoking-CVS Quick reference to CVS commands], and can be used to select the files
and revisions to annotate.  The options are described
in more detail there and in [cvs: Guide to CVS commands#Common-options Common command options].
</p>

<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">|[[#History-browsing| &lt;&lt; ]]|</td>
<td valign="middle" align="left">|[cvs: Handling binary files#Binary-files  &gt;&gt; ]|</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">|[[cvs#Top|Top]]|</td>
<td valign="middle" align="left">|[cvs: Table of Contents#SEC_Contents Contents]|</td>
<td valign="middle" align="left">|[cvs: Index#Index Index]|</td>
<td valign="middle" align="left">|[cvs: About this Manual#SEC_About  ? ]|</td>
</tr></table>
This document was generated by <em>a tester</em> on <em>a sunny day</em> using [http://www.nongnu.org/texi2html/ <em>texi2html</em>].
